home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / el130.zip / ERRLEVEL.DOC < prev   
Text File  |  1993-03-15  |  4KB  |  90 lines

  1.  
  2.                                    ERRLEVEL
  3.  
  4.                     Batch File Errlevel Reporting Utility
  5.                     ─────────────────────────────────────
  6.  
  7.      ERRLEVEL is a utility that simply executes another program and reports
  8.      the return code, or DOS errlevel, that is returned when the program
  9.      terminates.  In addition to reporting the errlevel via the console,
  10.      ERRLEVEL returns the same errlevel return code itself.  This means it
  11.      may be used virtually transparently in batch files.
  12.  
  13.      ERRLEVEL only works with .COM and .EXE files.  It will search the PATH
  14.      specified in the environment to find the file, just as COMMAND.COM
  15.      does.  It cannot execute batch files and COMMAND.COM internal
  16.      commands, but they do not return an errlevel anyway.  If desired,
  17.      ERRLEVEL can use a secondary command processor to process batch files
  18.      or execute internal commands.  However, unless COMMAND.COM itself has
  19.      a problem running, the errlevel returned will always be zero.
  20.  
  21.  
  22.      SYNTAX
  23.      ──────
  24.  
  25.      ERRLEVEL [/nnn] <command-line>
  26.  
  27.      The command-line to be executed should be entered exactly as it would
  28.      be directly from the COMMAND.COM prompt.  Any switches entered prior
  29.      to the command-line will be parsed by ERRLEVEL.COM, not the command to
  30.      be executed.  The only switch supported is a 1- to 3-digit decimal
  31.      number that may be used to force a specified errlevel to be returned
  32.      instead of just echoing the errlevel returned by the executed command.
  33.      To parse this switch, ERRLEVEL will normally use the leading forward
  34.      slash, but it does query DOS and will use any alternative switch
  35.      character that may have been specified, such as a dash.
  36.  
  37.      An errlevel may be specified without a command-line, and that errlevel
  38.      will simply be echoed without attempting to execute any command-line
  39.      program.  However, if no parameters of any type are entered, a brief
  40.      syntax help message is displayed.  Alternatively, this message may be
  41.      displayed using the TYPE command, as follows:
  42.  
  43.      TYPE ERRLEVEL.COM
  44.  
  45.      The same message is also displayed if an incorrect errlevel switch is
  46.      entered, or if an error is encountered parsing it.  If ERRLEVEL is
  47.      unable to find and/or execute the command-line, the following message
  48.      will be displayed:
  49.  
  50.      Unable to execute program.
  51.  
  52.      Any other errors in the command-line are not detectable by the
  53.      ERRLEVEL program, and any other error messages are the result of the
  54.      command-line program.
  55.  
  56.  
  57.      COPYRIGHT, LICENSE & WARRANTY
  58.      ─────────────────────────────
  59.  
  60.      Copyright (C) 1992 by William R. Peate
  61.      All rights reserved.
  62.  
  63.      The program file ERRLEVEL.COM and this accompanying documentation are
  64.      copyrighted by the author.  The copyright owner licenses anyone to
  65.      use, copy, and distribute this program and its documentation via any
  66.      means, electronic or otherwise, free of any and all charges.
  67.  
  68.      The user or anyone else is specifically prohibited from charging or
  69.      requesting donations for any such copies, or for distribution by other
  70.      than electronic means, unless approved by prior permission.  No person
  71.      or company may include this program or documentation along with or as
  72.      part of any commercial product, or any product for which charges are
  73.      made, without express permission from the copyright owner.
  74.  
  75.      No copy of this program may be distributed by any means without this
  76.      accompanying document, and this notice shall not be removed.
  77.  
  78.      The author makes no warranty of any kind, expressed or implied, and
  79.      will not be liable for any damages connected to or resulting from its
  80.      use.  Use and/or distribution of this program and document
  81.      acknowledges the above copyright and license.
  82.  
  83.      Questions and suggestions should be directed to the author:
  84.  
  85.                          William R. Peate
  86.                          725 FM 1959 #913
  87.                          Houston, TX 77034-5484
  88.                          CompuServe: 76525,2366
  89.                          BIX: bpeate
  90.